Content addressable memory (CAM) is a hardware module that either acts as a separate integrated circuit module or is embedded in another integrated circuit such as computer processing unit (CPU). More specifically, CAM is an application specific memory that allows its entire contents to be typically searched within a single clock cycle. CAM typically compares input search data against a table of stored data, and returns the address of the matching data. CAMs having a single clock cycle throughput make them faster than other hardware and software based search systems. Therefore, CAMs can be used in a wide variety of applications requiring high search speeds (e.g., image coding, parametric curve extraction, and Lempel-Ziv compression). The primary commercial application of CAMs today is to classify and forward Internet protocol (IP) packets in network routers.
There are two basic forms of CAM, the binary CAM (BCAM) and ternary CAM (TCAM). Binary CAMs support storage and searching of binary bits, and perform exact-match searches by storing either logic bit “0” or logic bit “1”. TCAMs support storing of logic bit “0”, logic bit “1”, or a don't care logic bit “X”. The don't care logic bit acts as a wildcard during searches, and allow TCAM to be attractive for implementing pattern-matching algorithms such as routing table rules (e.g., longest-prefix-match and range-match searches) in adaptive artificial neural networks.